package pojo;

import java.util.Objects;

public class Student {
    private int id;
    private String courseName;
    private String state;

    public Student() {
    }

    public Student(int id, String courseName, String state) {
        this.id = id;
        this.courseName = courseName;
        this.state = state;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return id == student.id && Objects.equals(courseName, student.courseName) && Objects.equals(state, student.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, courseName, state);
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", courseName='" + courseName + '\'' +
                ", state='" + state + '\'' +
                '}';
    }
}
